/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package LiveReservations.control.mocks;

import LiveReservations.control.info.SearchBusinessInfo;
import LiveReservations.dao.SearchBusinessDaoMock;
import LiveReservations.model.business.ABusiness;
import java.util.List;

/**
 * H klassh auth pernei ena SearchBusinessInfo(apo to view Contrl sto opoio
 * periexontai oi plirofories gia to search. To stelnei stin vash kai pernei
 * pisw mia List apo ABusiness, tin opoia stelnei sto view controller
 *
 * @author Alexei
 */
public class SearchBusinessMock {

    private final SearchBusinessInfo searchBusInfo;
    private SearchBusinessDaoMock businessDAO;

    public SearchBusinessMock(SearchBusinessInfo searchBusInfo) {
        this.searchBusInfo = searchBusInfo;
        businessDAO = new SearchBusinessDaoMock();
    }

    /**
     * H sinartisi pernei to Info, kanei extract to ABusiness kai to stelnei sto
     * DAO
     *
     * @return List<Business> me ta apotelesmata
     */
    public List<ABusiness> fetchResults() {
        // Spasimo tou Info kai extract business, apostolh sto DAO kai return
        //oti epistrepsei to dao     
        return businessDAO.getResults(searchBusInfo.getBusiness());
        //TODO : na graftei test.
    }

}
